import request from '@/api/request'

export function findAllRoles() {
  return request({
    url: `/admin/sysAuth/role/findAllRoles`
  })
}

export function findRolesByPage(start,limit) {
  return request({
      url: `/admin/sysAuth/role/findRolesByPage/${start}/${limit}`
  })
}

export function removeRole(id) {
  return request({
    url: `/admin/sysAuth/role/removeRole/${id}`,
    method:"DELETE"
  })
}

export function saveRolePermissions(data) {
  return request({
    url: `/admin/sysAuth/role/saveRolePermissions`,
    method: "post",
    data
  })
}

export function findAllPermissions() {
  return request({
    url: `/admin/sysAuth/permission/findAllPermissions`
  })
}

export function updateRolePermissions(data) {
  return request({
    url: `/admin/sysAuth/role/updateRolePermissions`,
    method: "PUT",
    data
  })
}





